using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._IntelligenceTools._Movement
{
    /// <summary>
    /// <para>Find Cotravelers</para>
    /// <para>Extracts unique identifiers that are moving through space and time at user-defined intervals in a point track dataset.</para>
    /// <para>提取在点轨迹数据集中以用户定义的时间间隔在空间和时间中移动的唯一标识符。</para>
    /// </summary>    
    [DisplayName("Find Cotravelers")]
    public class FindCotravelers : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public FindCotravelers()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_input_features">
        /// <para>Input Features</para>
        /// <para>The time-enabled features representing the known identifier that will be used to find cotravelers. The unique identifiers, time stamps, and locations will be transferred to the output layer to assist with calculating the time and spatial separation.</para>
        /// <para>表示将用于查找同伴的已知标识符的启用时间的功能。唯一标识符、时间戳和位置将被传输到输出图层，以帮助计算时间和空间分隔。</para>
        /// </param>
        /// <param name="_out_featureclass">
        /// <para>Output Feature Class</para>
        /// <para>The output feature class that will contain the point track segments identified as cotraveling with the input source layers. This feature class will include the source with which the specified point track segment is associated. Time and spatial separation will be calculated for each point track feature.</para>
        /// <para>输出要素类，该类将包含标识为与输入源图层共行的点轨迹线段。此要素类将包括与指定点轨迹段关联的源。将计算每个点轨迹要素的时间和空间间隔。</para>
        /// </param>
        /// <param name="_id_field">
        /// <para>ID Field</para>
        /// <para>A field from the Input Features parameter that will be used to obtain the unique identifiers per point track. The field will be copied to the output feature class.</para>
        /// <para>输入要素参数中的字段，用于获取每个点轨迹的唯一标识符。该字段将复制到输出要素类。</para>
        /// </param>
        public FindCotravelers(object _input_features, object _out_featureclass, object _id_field)
        {
            this._input_features = _input_features;
            this._out_featureclass = _out_featureclass;
            this._id_field = _id_field;
        }
        public override string ToolboxName => "Intelligence Tools";

        public override string ToolName => "Find Cotravelers";

        public override string CallName => "intelligence.FindCotravelers";

        public override List<string> AcceptEnvironments => ["extent", "outputCoordinateSystem", "parallelProcessingFactor", "workspace"];

        public override object[] ParameterInfo => [_input_features, _out_featureclass, _id_field, _search_distance, _time_difference, _input_type.GetGPValue(), _secondary_features, _secondary_id_field, _create_summary_table.GetGPValue(), _out_summary_table, _include_min_cotraveling_duration.GetGPValue(), _min_cotraveling_duration];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The time-enabled features representing the known identifier that will be used to find cotravelers. The unique identifiers, time stamps, and locations will be transferred to the output layer to assist with calculating the time and spatial separation.</para>
        /// <para>表示将用于查找同伴的已知标识符的启用时间的功能。唯一标识符、时间戳和位置将被传输到输出图层，以帮助计算时间和空间分隔。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _input_features { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output feature class that will contain the point track segments identified as cotraveling with the input source layers. This feature class will include the source with which the specified point track segment is associated. Time and spatial separation will be calculated for each point track feature.</para>
        /// <para>输出要素类，该类将包含标识为与输入源图层共行的点轨迹线段。此要素类将包括与指定点轨迹段关联的源。将计算每个点轨迹要素的时间和空间间隔。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_featureclass { get; set; }


        /// <summary>
        /// <para>ID Field</para>
        /// <para>A field from the Input Features parameter that will be used to obtain the unique identifiers per point track. The field will be copied to the output feature class.</para>
        /// <para>输入要素参数中的字段，用于获取每个点轨迹的唯一标识符。该字段将复制到输出要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _id_field { get; set; }


        /// <summary>
        /// <para>Search Distance</para>
        /// <para>The maximum distance that can separate features before they are considered not to be cotraveling features. The default is 100 feet.</para>
        /// <para>在要素被视为非共行要素之前，可以分隔要素的最大距离。默认值为 100 英尺。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Search Distance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string _search_distance { get; set; } = "100 Feet";


        /// <summary>
        /// <para>Time Difference</para>
        /// <para>The maximum time difference that can separate features before they are considered not to be cotraveling features. The default is 10 seconds.</para>
        /// <para>在要素被视为非共行要素之前，可以分隔要素的最大时差。默认值为 10 秒。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time Difference")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_difference { get; set; } = null;


        /// <summary>
        /// <para>Input Type</para>
        /// <para><xdoc>
        ///   <para>Specifies whether cotravelers will be identified in one feature class or between two.</para>
        ///   <bulletList>
        ///     <bullet_item>One Feature Class— Cotravelers will be detected in one feature class. This is the default.</bullet_item><para/>
        ///     <bullet_item>Two Feature Classes—Cotravelers will be detected across two feature classes.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是在一个要素类中还是在两个要素类之间标识共同旅行者。</para>
        ///   <bulletList>
        ///     <bullet_item>一个要素类—将在一个要素类中检测共行者。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>两个要素类—将在两个要素类中检测共行者。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _input_type_value _input_type { get; set; } = _input_type_value._ONE_FEATURECLASS;

        public enum _input_type_value
        {
            /// <summary>
            /// <para>One Feature Class</para>
            /// <para>One Feature Class— Cotravelers will be detected in one feature class. This is the default.</para>
            /// <para>一个要素类—将在一个要素类中检测共行者。这是默认设置。</para>
            /// </summary>
            [Description("One Feature Class")]
            [GPEnumValue("ONE_FEATURECLASS")]
            _ONE_FEATURECLASS,

            /// <summary>
            /// <para>Two Feature Classes</para>
            /// <para>Two Feature Classes—Cotravelers will be detected across two feature classes.</para>
            /// <para>两个要素类—将在两个要素类中检测共行者。</para>
            /// </summary>
            [Description("Two Feature Classes")]
            [GPEnumValue("TWO_FEATURECLASSES")]
            _TWO_FEATURECLASSES,

        }

        /// <summary>
        /// <para>Secondary Features</para>
        /// <para><xdoc>
        ///   <para>A second feature class to identify cotravelers. Potential cotravelers will be evaluated using the following:
        ///   <bulletList>
        ///     <bullet_item>Cotravelers are cotraveling inside the input features.  </bullet_item><para/>
        ///     <bullet_item>Cotravelers are cotraveling inside the secondary features.  </bullet_item><para/>
        ///     <bullet_item>Cotravelers are cotraveling between the input features and secondary features.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>用于识别同伴的第二个要素类。将使用以下方法评估潜在的共同旅行者：
        ///   <bulletList>
        ///     <bullet_item>共同旅行者在输入要素内共同旅行。</bullet_item><para/>
        ///     <bullet_item>共同旅行者在次要功能内共同旅行。</bullet_item><para/>
        ///     <bullet_item>共路者在输入要素和辅助要素之间共行。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Secondary Features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _secondary_features { get; set; } = null;


        /// <summary>
        /// <para>Secondary ID Field</para>
        /// <para>A field from the Secondary Features parameter that will be used to obtain the unique identifiers per point track. The field will be copied to the output feature class.</para>
        /// <para>辅助要素参数中的字段，用于获取每个点轨迹的唯一标识符。该字段将复制到输出要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Secondary ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _secondary_id_field { get; set; } = null;


        /// <summary>
        /// <para>Create Summary Table</para>
        /// <para><xdoc>
        ///   <para>Specifies whether an output summary table will be created.
        ///   <bulletList>
        ///     <bullet_item>Checked—A summary table will be created.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—A summary table will not be created. This is the default.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定是否创建输出汇总表。
        ///   <bulletList>
        ///     <bullet_item>选中 - 将创建汇总表。</bullet_item><para/>
        ///     <bullet_item>未选中 - 将不创建汇总表。这是默认设置。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Create Summary Table")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _create_summary_table_value? _create_summary_table { get; set; } = null;

        public enum _create_summary_table_value
        {
            /// <summary>
            /// <para>CREATE_SUMMARY_TABLE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CREATE_SUMMARY_TABLE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_SUMMARY_TABLE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_SUMMARY_TABLE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Output Summary Table</para>
        /// <para>The output table that will store the summary information. This option is only active when the Create Summary Table parameter is checked. Output files must be tables in a file geodatabase, text files, or comma separated value (CSV) files.</para>
        /// <para>将存储摘要信息的输出表。仅当选中创建汇总表参数时，此选项才处于活动状态。输出文件必须是文件地理数据库中的表、文本文件或逗号分隔值 （CSV） 文件。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Summary Table")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_summary_table { get; set; } = null;


        /// <summary>
        /// <para>Include Minimum Cotraveling Duration Filter</para>
        /// <para><xdoc>
        ///   <para>Specifies whether a filter that only returns cotravelers who meet a minimum time of traveling together will be applied.
        ///   <bulletList>
        ///     <bullet_item>Checked—The minimum cotraveler duration filter will be applied.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The minimum cotraveler duration filter will not be applied. This is the default.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定是否应用仅返回满足最短旅行时间的同伴旅行者的筛选器。
        ///   <bulletList>
        ///     <bullet_item>选中—将应用最短共旅客持续时间过滤器。</bullet_item><para/>
        ///     <bullet_item>未选中 - 将不应用最短共行旅客持续时间过滤器。这是默认设置。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Include Minimum Cotraveling Duration Filter")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _include_min_cotraveling_duration_value? _include_min_cotraveling_duration { get; set; } = null;

        public enum _include_min_cotraveling_duration_value
        {
            /// <summary>
            /// <para>MIN_COTRAVELING_DURATION</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("MIN_COTRAVELING_DURATION")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_MIN_COTRAVELING_DURATION</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_MIN_COTRAVELING_DURATION")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Minimum Cotraveling Duration</para>
        /// <para>The minimum amount of time that two features must be moving through space and time together before they will be considered cotravelers.</para>
        /// <para>两个要素在被视为同行者之前必须同时在空间和时间中移动的最短时间。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Minimum Cotraveling Duration")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _min_cotraveling_duration { get; set; } = null;


        public FindCotravelers SetEnv(object extent = null, object outputCoordinateSystem = null, object parallelProcessingFactor = null, object workspace = null)
        {
            base.SetEnv(extent: extent, outputCoordinateSystem: outputCoordinateSystem, parallelProcessingFactor: parallelProcessingFactor, workspace: workspace);
            return this;
        }

    }

}